1. Field of the Invention
The present invention relates to an electrically rewritable semiconductor memory device.
2. Description of the Related Art
In an electrically writable/erasable non-volatile memory, a user inputs a given instruction for writing/erasing data into an input interface of an IC, thereby being capable of writing desired data into a non-volatile memory of an EEPROM (electrically erasable and programmable read-only memory).
The given instruction is an input signal pattern for inputting an electric signal via a terminal that is provided for the EEPROM for communication with the exterior, to thereby operate the EEPROM. The input signal pattern, being determined in advance for each EEPROM, is inputted and the EEPROM executes the operation instructed by the user, such as writing/erasing the data.
The writing/erasing can be performed any desired number of times. Therefore, it is not uncommon that the user mistakenly writes other data over the data which was written into the non-volatile memory, or mistakenly erases it.
Conventionally, in order not to mistaken y overwrite or erase the data that is written once, an EEPROM protection function for preventing erroneous writing and erroneous erasing is commonly used. The protection function is a function such that writing and erasing are not performed on the EEPROM even when the given instruction for performing the writing/erasing of the data into the EEPROM is inputted. A given instruction to make the protection function operate is synchronized to a given clock and inputted to make the EEPROM function.
The given clock is a clock which is inputted from the exterior, or a clock generated at an internal location. The clock frequency is a fixed frequency.
Further, in the conventional art, since the clock frequency is a fixed clock frequency, there is a high possibility that the fixed clock frequency will coincide with the frequency set for the given instruction that makes the protection function operate.
Conventionally, in a case where the writing of data to the non-volatile memory is performed only once, and writing is prohibited after the second time even when the user performs a write action, the EEPROM protection function such as described above is commonly used.
In the protection, the given instruct ion for making the protection function operate is inputted into the input interface of the IC, so that, thereafter, the IC does not execute the writing/erasing even when the user gives a writing/erasing command, thus protecting the memory data as it was be fore the protection operation. Alternatively, in order to activate the protection function, a given signal is applied to a terminal arranged to the EEPROM, causing the protection function to operate.
However, in order to make the protection function operate, the user must either input the given instruction or input the given signal to a certain terminal, as described above. Thus, there was a problem in that after the data is written to the EEPROM, in order to protect the data, a burden is imposed on the user so that the user must input the signal to the EEPROM.
Further, since the given instruction and input signal must be inputted correctly to make sure the protection function operates, there was a problem in that such a requirement may interfere with the user's objective that the data written into the memory be protected in a reliable fashion.
Conventionally, since the clock frequency is a fixed clock frequency, there is the high possibility that the frequency set for the given instruction to make the protection function operate. which is synchronized with the clock frequency, will coincide with the fixed clock frequency. This problem can be overcome by increasing the number of bits of the given instruction. However, increasing the number of bits of the given instruction increases the scale of the circuit.